package br.ufpe.cin.imlm2.jbeat.soot.report;

import java.util.ArrayList;
import java.util.List;

import br.ufpe.cin.imlm2.util.options.Option;
import br.ufpe.cin.imlm2.util.options.Options;

public class ReportOptions extends Options {

	public static final String SINGLE_FILE = "singleFile";
	public static final String FULL_REPORT = "fullReport";
	public static final String STD_LIBRARIES = "reportStdLibs";
	public static final String REPORT_PATH = "reportPath";
	public static final String REPORT_CLASSES = "reportClasses";
	public static final String DETAILED = "detailed";

	public ReportOptions() {
		super();
		this.options
				.add(new Option(
						SINGLE_FILE,
						"sf",
						"Generate the report in a single file or individual files per class.",
						Boolean.FALSE, Boolean.class, null));
		this.options.add(new Option(FULL_REPORT, "full",
				"If set to 'true' generates a full report", Boolean.FALSE,
				Boolean.class, null));
		this.options.add(new Option(STD_LIBRARIES, "repStdLibs", "",
				Boolean.FALSE, Boolean.class, null));
		this.options.add(new Option(REPORT_PATH, "path", "", System
				.getProperty("user.dir"), String.class, null));
		this.options.add(new Option(REPORT_CLASSES, "repClss", "",
				new ArrayList<String>(), List.class, String.class));
		this.options.add(new Option(DETAILED, null, "", Boolean.TRUE,
				Boolean.class, null));
	}

	public boolean isSingle_file() {
		return (Boolean) this.getOption(SINGLE_FILE).getValue();
	}

	public boolean isFull_report() {
		return (Boolean) this.getOption(FULL_REPORT).getValue();
	}

	public boolean isStd_libraries() {
		return (Boolean) this.getOption(STD_LIBRARIES).getValue();
	}

	public String getReport_path() {
		return (String) this.getOption(REPORT_PATH).getValue();
	}

	@SuppressWarnings("unchecked")
	public List<String> getReport_classes() {
		return (List<String>) this.getOption(REPORT_CLASSES).getValue();
	}

	public boolean isDetailed() {
		return (Boolean) this.getOption(DETAILED).getValue();
	}

}
